#ifndef SERVERCOMMANGE_H
#define SERVERCOMMANGE_H

#include <QTcpServer>
#include <QTcpSocket>
#include <QObject>
#include <QWidget>

#include "PluginInterface/robcontrollerhmi_interface.h"
#include "PluginInterface/teccontrollerhmi_interface.h"

class  HmiServer:QObject{
    Q_OBJECT
public:
    HmiServer();
    ~HmiServer();

public:
    int HmiClientOrder;

    QTcpServer *pHmiRobServer;
    QTcpSocket *pHmiRobClient;

    QTcpServer *pHmiTecServer;
    QTcpSocket *pHmiTecClient;

public:
    TecControllerHMI*  pTecControllerHMI;
    RobControllerHMI*  pRobControllerHMI;

private:
    short SignalSlotConnect();

public slots:
    void onNewRobConnection();
    void onNewTecConnection();

    void onReadyRead_Client_RobController();
    void onReadyRead_Client_TecController();

};

#endif // SERVERCOMMANGE_H
